-- GENERATED SPELL FOR [Master Necromancer] --


function spell0_27732(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(15537,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27732', 3000, 1)
end

function spell1_27732(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(61558,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27732', 2000, 1)
end

function spell2_27732(pUnit, Event) --@Summon Skeletons,n/a--
pUnit:FullCastSpellOnTarget(52611,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27732', 2000, 1)
end

function Sorts_27732(pUnit, Event)
local choix_sorts_27732 = math.random(0, 2)
if choix_sorts_27732 == 0 then
pUnit:RegisterEvent('spell0_27732', 1, 1)
end
if choix_sorts_27732 == 1 then
pUnit:RegisterEvent('spell1_27732', 1, 1)
end
if choix_sorts_27732 == 2 then
pUnit:RegisterEvent('spell2_27732', 1, 1)
end
end

function mob27732_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27732', math.random(1500, 3000), 1)
end

function mob27732_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27732_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27732_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27732, 1, 'mob27732_Action')
RegisterUnitEvent(27732, 2, 'mob27732_Leave')
RegisterUnitEvent(27732, 3, 'mob27732_Kill')
RegisterUnitEvent(27732, 4, 'mob27732_Die')
